package com.ruoyi.carowner.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carowner.mapper.CarownerRuleMapper;
import com.ruoyi.carowner.domain.CarownerRule;
import com.ruoyi.carowner.service.ICarownerRuleService;

/**
 * 兑换规则Service业务层处理
 * 
 * @author aa
 * @date 2024-08-14
 */
@Service
public class CarownerRuleServiceImpl implements ICarownerRuleService 
{
    @Autowired
    private CarownerRuleMapper carownerRuleMapper;

    /**
     * 查询兑换规则
     * 
     * @param id 兑换规则主键
     * @return 兑换规则
     */
    @Override
    public CarownerRule selectCarownerRuleById(Integer id)
    {
        return carownerRuleMapper.selectCarownerRuleById(id);
    }

    /**
     * 查询兑换规则列表
     * 
     * @param carownerRule 兑换规则
     * @return 兑换规则
     */
    @Override
    public List<CarownerRule> selectCarownerRuleList(CarownerRule carownerRule)
    {
        return carownerRuleMapper.selectCarownerRuleList(carownerRule);
    }

    /**
     * 新增兑换规则
     * 
     * @param carownerRule 兑换规则
     * @return 结果
     */
    @Override
    public int insertCarownerRule(CarownerRule carownerRule)
    {
        return carownerRuleMapper.insertCarownerRule(carownerRule);
    }

    /**
     * 修改兑换规则
     * 
     * @param carownerRule 兑换规则
     * @return 结果
     */
    @Override
    public int updateCarownerRule(CarownerRule carownerRule)
    {
        return carownerRuleMapper.updateCarownerRule(carownerRule);
    }

    /**
     * 批量删除兑换规则
     * 
     * @param ids 需要删除的兑换规则主键
     * @return 结果
     */
    @Override
    public int deleteCarownerRuleByIds(Integer[] ids)
    {
        return carownerRuleMapper.deleteCarownerRuleByIds(ids);
    }

    /**
     * 删除兑换规则信息
     * 
     * @param id 兑换规则主键
     * @return 结果
     */
    @Override
    public int deleteCarownerRuleById(Integer id)
    {
        return carownerRuleMapper.deleteCarownerRuleById(id);
    }
}
